package com.four.basicinfo.service.impl;

import com.four.basicinfo.dao.DocumentDao;
import com.four.basicinfo.entity.Document;
import com.four.basicinfo.service.DocumentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DocumentServiceImpl implements DocumentService {
    @Autowired
    private DocumentDao documentMapper;
    /**
     * 查询证件信息
     *
     * @param id 证件信息主键
     * @return 证件信息
     */
    @Override
    public Document selectDocumentById(Long id)
    {
        return documentMapper.selectDocumentById(id);
    }
    /**
     * 新增证件信息
     *
     * @param document 证件信息
     * @return 结果
     */
    @Override
    public int insertDocument(Document document)
    {
        return documentMapper.insertDocument(document);
    }

    /**
     * 修改证件信息
     *
     * @param document 证件信息
     * @return 结果
     */
    @Override
    public int updateDocument(Document document)
    {
        return documentMapper.updateDocument(document);
    }
    /**
     * 删除证件信息信息
     *
     * @param id 证件信息主键
     * @return 结果
     */
    @Override
    public int deleteDocumentById(Long id)
    {
        return documentMapper.deleteDocumentById(id);
    }
}
